#include <iostream>
using namespace std;

const int N = 40;
int arr[N] = {0, 1, 1};

int main()
{
	for (int i = 3; i <= 30; i++)
	{
		arr[i] = arr[i-1] + arr[i-2];
	}
	
	int n; cin >> n;
	int a;
	while (n--)
	{
		cin >> a;
		cout << arr[a] << endl;
	}
	
	return 0;
}
